<template>
  <el-input v-bind="$attrs" v-model="data" placeholder="请输入" />
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
const props = defineProps({
  resetData: { type: Number, required: false }
})
const data = ref('')
watch(
  // 侦听 重置数据
  () => props.resetData,
  () => {
    data.value = ''
  }
)
</script>
